package com.cloudsigns.factorymanager2.project.fragment;


import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.cloudsigns.factorymanager2.R;
import com.cloudsigns.factorymanager2.engineering.activity.CompletionOrderListForSuperActivity;
import com.cloudsigns.factorymanager2.engineering.activity.EngineeringManagerStatusTableActivity;

/**
 * Created by tony on 2017/11/25.
 */

public class ProjectManagerFragment extends Fragment implements View.OnClickListener {
    private View rl_zongkongbiao, rl_shengchanguanli, rl_gongchengguanli, rl_xiangmujihua,rl_zhinengkongzhi,rl_gongxuzhongxin,rl_chanpinzhijian,rl_gongchengjungong,rl_xiangmuziliao,rl_tixiang;

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_project_manager, null);
        rl_gongchengguanli = view.findViewById(R.id.rl_gongchengguanli);
        rl_gongchengjungong = view.findViewById(R.id.rl_gongchengjungong);


        rl_gongchengguanli.setOnClickListener(this);
        rl_gongchengjungong.setOnClickListener(this);

        return view;
    }

    @Override
    public void onClick(View view) {
        Intent mIntent;
        switch (view.getId()) {
            //工程管理
            case R.id.rl_gongchengguanli:
               // mIntent = new Intent(getActivity(), ProjectMapActivity.class);
                mIntent = new Intent(getActivity(), EngineeringManagerStatusTableActivity.class);
                startActivity(mIntent);
                break;
                // 工程竣工
            case R.id.rl_gongchengjungong:
                mIntent = new Intent(getActivity(), CompletionOrderListForSuperActivity.class);
                startActivity(mIntent);
//                mIntent = new Intent(getActivity(), SuccessOrderListForMnagerActivity.class);
//                startActivity(mIntent);
                break;
//            case R.id.rl_1:
//                mIntent = new Intent(getActivity(), ProjectMasterScheduleActivity.class);
//                startActivity(mIntent);
//                break;
//            case R.id.rl_2:
//                mIntent = new Intent(getActivity(), ProductionScheduleActivity.class);
//                startActivity(mIntent);
//                break;
//            case R.id.rl_3:
//                mIntent = new Intent(getActivity(), EngineeringInstallationScheduleTableActivity.class);
//                startActivity(mIntent);
//                break;
//            case R.id.rl_4:
//                mIntent = new Intent(getActivity(), MaintenanceOrderListActivity.class);
//                startActivity(mIntent);
//                break;
        }
    }
}
